package edu.pku.sei.mte.mtemodel.basictypes;

import edu.pku.sei.mte.utilities.Visitor;


public class IntegerType extends PrimitiveType {
	public String getName() {
		return "Integer";
	}

	public void setName(String name) {
	}

	@Override
	public Object toValue(String text) {
		Integer v = 0;
		try {
			v = Integer.parseInt(text);
		} catch (Exception e) {
		}
		return v;
	}

	@Override
	public Object accept(Visitor visitor) {
		return visitor.visitIntegerType(this);
	}

}
